<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <!--如果是IE 就以标准渲染-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <!-- 视窗——————响应式布局 -->
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes,minimum-scale=0.5" /> -->
    <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=0.5, maximum-scale=5.0' />

    <!--当前页面的三要素-->
    <title>运维系统</title>
    <meta name="description" content="聚能优电" />
    <meta http-equiv="keywords" content="聚能优电" />
    <script type="text/javascript" src="./js/verify.js"></script>
    <script type="text/javascript" src="./js/common/commonfuntion.js"></script>
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="./css/common/common.css" />
    <link rel="stylesheet" type="text/css" href="./css/jquery-accordion-menu.css" />
    <link rel="stylesheet" type="text/css" href="./css/mainmonitor_sz.css" />
</head>

<body>
    <div id="container" class="mainmonitor_sz">
        <div class="mainmonitor_sz_01">
            <!--主屏内容-->
            <div class="mainmonitor_sz_screen">
                <div class="m_title">
                    <a href="JavaScript:history.go(-1);" class="back">
                        <img src="./images/back.svg" alt="" />
                    </a>
                    <span class="tit" id="projectNameCN"></span>
                </div>
                <div class="m_content">
                    <header class="tabHead">
                        <span class="active"><i>项目状态</i></span>
                        <span><i>一次系统图</i></span>
                    </header>
                    <article class="khfxWarp">
                        <div class="khfxPane xmzt">
                            <div class="zt1 ztdetail" style="margin-top: 0.5rem;">
                                <ul>
                                    <li style="flex-basis: 0.8rem;">
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="dwgl">0</span><span>kW</span>

                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS功率</p>
                                        <div class="ztdiv">
                                            <span id="pcsgl"></span><span>kW</span>
                                        </div>
                                    </li>
                                    <li style="flex-basis: 0.8rem;">
                                        <p>负载功率</p>
                                        <div class="ztdiv">
                                            <span id="fzgl"></span><span>kW</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li style="flex-basis: 0.8rem;">
                                        <p>防逆流值</p>
                                        <div class="ztdiv">
                                            <span id="fnlz">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="soc">0</span><span>%</span>
                                        </div>
                                    </li>
                                    
                                    <li style="flex-basis: 0.8rem;">
                                        <p>SOH</p>
                                        <div class="ztdiv">
                                            <span id="soh"></span><span>%</span>

                                        </div>
                                    </li>
                                    
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>柴油机1</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc1" style="font-size:0.3rem;">0</span><span></span>
                                        </div>
                                    </li>
                                    <li style="flex-basis: 1.4rem;">
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc1">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc1">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>柴油机2</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc2" style="font-size:0.3rem;">0</span><span></span>
                                        </div>
                                    </li>
                                    <li style="flex-basis: 1.4rem;">
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc2">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc2">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>柴油机3</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc3" style="font-size:0.3rem;">0</span><span></span>
                                        </div>
                                    </li>
                                    <li style="flex-basis: 1.4rem;">
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc3">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc3">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>柴油机4</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>状态</p>
                                        <div class="ztdiv">
                                            <span id="zt_cnc4" style="font-size:0.3rem;">0</span><span></span>
                                        </div>
                                    </li>
                                    <li style="flex-basis: 1.4rem;">
                                        <p>发电功率</p>
                                        <div class="ztdiv">
                                            <span id="gl_cnc4">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>燃油位</p>
                                        <div class="ztdiv">
                                            <span id="ryw_cnc4">0</span><span>%</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>


                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_orange.svg" alt="" />
                                    <span>PCS1</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>总有功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszyggl_sz1">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总视在功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszszgl_sz1">0</span><span>kVA</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总无功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszwggl_sz1">0</span><span>kVar</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_orange.svg" alt="" />
                                    <span>PCS2</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>总有功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszyggl_sz2">0</span><span>kW</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总视在功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszszgl_sz2">0</span><span>kVA</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>总无功功率</p>
                                        <div class="ztdiv">
                                            <span id="pcszwggl_sz2">0</span><span>kVar</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>


                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_green.svg" alt="" />
                                    <span>BMS1</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="bmssoc1">0</span><span>%</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可充电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskcdl1">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可放电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskfdl1">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt2 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_green.svg" alt="" />
                                    <span>BMS2</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>SOC</p>
                                        <div class="ztdiv">
                                            <span id="bmssoc2">0</span><span>%</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可充电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskcdl2">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>可放电量</p>
                                        <div class="ztdiv">
                                            <span id="bmskfdl2">0</span><span>kWh</span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt3 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>设备温度1</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>散热器温度</p>
                                        <div class="ztdiv">
                                            <span id="fkwd1">24</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>机柜温度</p>
                                        <div class="ztdiv">
                                            <span id="jgwd1">15</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>环境温度</p>
                                        <div class="ztdiv">
                                            <span id="hjwd1">16</span><span>℃</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>电池最高温度</p>
                                        <div class="ztdiv">
                                            <span id="dczgwd1">23.4</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>电池最低温度</p>
                                        <div class="ztdiv">
                                            <span id="dczdwd1">22.2</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p></p>
                                        <div class="ztdiv"><span id=""></span><span></span></div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt3 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_blue.svg" alt="" />
                                    <span>设备温度2</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>散热器温度</p>
                                        <div class="ztdiv">
                                            <span id="fkwd2">24</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>机柜温度</p>
                                        <div class="ztdiv">
                                            <span id="jgwd2">15</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>环境温度</p>
                                        <div class="ztdiv">
                                            <span id="hjwd2">16</span><span>℃</span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>电池最高温度</p>
                                        <div class="ztdiv">
                                            <span id="dczgwd2">23.4</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>电池最低温度</p>
                                        <div class="ztdiv">
                                            <span id="dczdwd2">22.2</span><span>℃</span>
                                        </div>
                                    </li>
                                    <li>
                                        <p></p>
                                        <div class="ztdiv"><span id=""></span><span></span></div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt4 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_orange.svg" alt="" />
                                    <span>设备状态1</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>交流调度</p>
                                        <div class="ztdiv jldt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>直流调度</p>
                                        <div class="ztdiv zldd1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS通讯状态</p>
                                        <div class="ztdiv pcstxzt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS通讯状态</p>
                                        <div class="ztdiv bmstxzt1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>并网</p>
                                        <div class="ztdiv bw1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>离网</p>
                                        <div class="ztdiv lw1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统警告</p>
                                        <div class="ztdiv xtjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统故障</p>
                                        <div class="ztdiv xtgz1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>远程控制</p>
                                        <div class="ztdiv yckz1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS一级警告</p>
                                        <div class="ztdiv yjjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS二级警告</p>
                                        <div class="ztdiv ejjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS三级警告</p>
                                        <div class="ztdiv sjjg1">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="zt4 ztdetail">
                                <div class="detail_tit">
                                    <img src="./images/arrows_orange.svg" alt="" />
                                    <span>设备状态2</span>
                                </div>
                                <ul>
                                    <li>
                                        <p>交流调度</p>
                                        <div class="ztdiv jldt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>直流调度</p>
                                        <div class="ztdiv zldd2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>PCS通讯状态</p>
                                        <div class="ztdiv pcstxzt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS通讯状态</p>
                                        <div class="ztdiv bmstxzt2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>并网</p>
                                        <div class="ztdiv bw2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>离网</p>
                                        <div class="ztdiv lw2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统警告</p>
                                        <div class="ztdiv xtjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>系统故障</p>
                                        <div class="ztdiv xtgz2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                                <ul>
                                    <li>
                                        <p>远程控制</p>
                                        <div class="ztdiv yckz2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS一级警告</p>
                                        <div class="ztdiv yjjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS二级警告</p>
                                        <div class="ztdiv ejjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                    <li>
                                        <p>BMS三级警告</p>
                                        <div class="ztdiv sjjg2">
                                            <span class="onoff"></span>
                                        </div>
                                    </li>
                                </ul>
                            </div>

                            <div class="echarts_wrap">
                                <div id="echarts1" style="height:4rem;margin-top:0.3rem;"></div>
                                <div id="echarts2" style="height:4rem;margin-top:0.5rem;"></div>
                                <div id="echarts3" style="height:4rem;margin-top:0.5rem;"></div>
                            </div>
                        </div>
                        <div class="khfxPane">
                            <div class="formbody">
                                <div class="layoutmap">
                                    <div id="grightline1" class="hp hpthin goright"
                                        style="left:8%; top:13.5%;  width:90%; z-index: 1;"></div>

                                    <!-- <div id="grightline2" class="hp hpthin goright"
                                        style="left:20%; top:46%;  width:23%;z-index: 1;"></div>
                                    <div id="grightline3" class="hp hpthin goright"
                                        style="left:66%; top:46%;  width:23%;z-index: 1;"></div> -->

                                    <div id="pcs1">
                                        <!-- pcs的p为正数，箭头方向为从上到下 -->
                                        <!-- pcs的p为负数，箭头方向为从下到上 -->
                                    </div>

                                    <div id="pcs2">
                                        <!-- pcs的p为正数，箭头方向为从上到下 -->
                                        <!-- pcs的p为负数，箭头方向为从下到上 -->
                                    </div>

                                    <div class="layoutimage bordernull" title="柴油机"
                                        style="left:0%; top:5%; width:13.5%;">
                                        <img src="./images/chaiyoujib.svg" alt="" style="width:100%;position: absolute;left: 50%;top: 50%;transform:
                                            translate(-50%, -50%);z-index: 2;"
                                            onclick="window.location.href='mainmonitorxscn001/mainmonitor_xscn001cyj.html';"
                                            />
                                    </div>
                                    <div class="infobox chaiyouji" style="left:0%; top:19%;z-index: 2;padding:0;">
                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="cyj_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="cyj_sxdl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">P(kW):</p>
                                            <div id="cyj_rp"></div>
                                        </div>
                                    </div>

                                    <!-- <div onclick="window.location.href='mainmonitorsz/mainmonitor_szyjg.html';"
                                        class="layoutimage bordernull" title="一级柜"
                                        style="left:64%; top:5%; width:13.5%; z-index: 2;">
                                        <img src="./images/yjgb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div> -->

                                    <div onclick="window.location.href='#';" class="layoutimage bordernull" title="负载"
                                        style="left: 85%; top:5%; width:13.5%;z-index: 2;">
                                        <img src="./images/fuzaib.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainfuzai" style="left:82%; top:19%;z-index: 2;">
                                        <div class="pcontent">
                                            <p class="ptitle">P(kW):</p>
                                            <div id="load"></div>
                                        </div>
                                    </div>

                                    <div onclick="window.location.href='mainmonitorxscn001/mainmonitor_xscn001pcs.html';"
                                        class="layoutimage bordernull" title="PCS1"
                                        style="left:14%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/pcsb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainpcs1" style="left:10%; top:52%;z-index: 2;">

                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="pcs1_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="pcs1_sxdl"></div>
                                        </div>

                                        <div class="pcontent">
                                            <span>P(kW):</span><span id="pcs1_rp"></span>
                                        </div>

                                        <div class="pcontent">
                                            <span>并离网:</span><span id="pcs1_blw"></span>
                                        </div>
                                    </div>

                                    <div onclick="window.location.href='mainmonitorxscn001/mainmonitor_xscn001pcs.html';"
                                        class="layoutimage bordernull" title="PCS2"
                                        style="left:52%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/pcsb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainpcs2" style="left:51%; top:52%;z-index: 2;padding-left:0;">

                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="pcs2_sxdy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="pcs2_sxdl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <span>P(kW):</span><span id="pcs2_rp"></span>
                                        </div>
                                        <div class="pcontent">
                                            <span>并离网:</span><span id="pcs2_blw"></span>
                                        </div>

                                    </div>

                                    <div onclick="window.location.href='mainmonitorxscn001/mainmonitor_xscn001bms.html';"
                                        class="layoutimage bordernull" title="BMS1"
                                        style="left:14%; top:72%; width:13.5%;z-index: 2;">
                                        <img src="./images/bmsb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>

                                    <div class="infobox mainbms1" style="left:13%; top:86%;z-index: 2;">

                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="bms1_dy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="bms1_dl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">SOC:</p>
                                            <div id="bms1_soc"></div>
                                        </div>
                                    </div>

                                    <div onclick="window.location.href='mainmonitorxscn001/mainmonitor_xscn001bms.html';"
                                        class="layoutimage bordernull" title="BMS2"
                                        style="left:52%; top:72%; width:13.5%;z-index: 2;">
                                        <img src="./images/bmsb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainbms2" style="left:52%; top:86%;z-index: 2;">
                                        <div class="pcontent">
                                            <p class="ptitle">U(V):</p>
                                            <div id="bms2_dy"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">I(A):</p>
                                            <div id="bms2_dl"></div>
                                        </div>
                                        <div class="pcontent">
                                            <p class="ptitle">SOC:</p>
                                            <div id="bms2_soc"></div>
                                        </div>

                                    </div>

                                    <!-- <div onclick="window.location.href='mainmonitorsz/mainmonitor_szac.html';"
                                        class="layoutimage bordernull" title="AC1"
                                        style="left:40%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/acb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainac1" style="left:36%; top:52%; width:40%;z-index: 2;">
                                        <p class="ptitle">T(℃):<br />H:</p>
                                        <p class="pcontent" id="cont_w">
                                            <span id="ac1_sd"></span><br /><span id="ac1_wd"></span>
                                        </p>
                                    </div> -->

                                    <!-- <div onclick="window.location.href='mainmonitorsz/mainmonitor_szac.html';"
                                        class="layoutimage bordernull" title="AC2"
                                        style="left:85%; top:38%; width:13.5%;z-index: 2;">
                                        <img src="./images/acb.svg" alt=""
                                            style="width:100%;position: absolute;left: 50%;top: 50%;transform: translate(-50%, -50%);" />
                                    </div>
                                    <div class="infobox mainac2" style="left:78%; top:52%; width:40%;z-index: 2;">
                                        <p class="ptitle">T(℃):<br />H:</p>
                                        <p class="pcontent" id="cont_w">
                                            <span id="ac2_sd"></span><br /><span id="ac2_wd"></span>
                                        </p>
                                    </div> -->
                                </div>
                            </div>
                        </div>
                    </article>
                </div>
            </div>
        </div>
    </div>

    <script>
        (function (win, doc) {
            var docEl = doc.documentElement || document.body; //获取HTML标签

            var container = doc.getElementById("container"); //container元素
            //判断是移动端设备还是PC,移动 就采用'orientationchange',横竖屏事件，PC端就采用onresize，窗口改变时间
            var resize =
                "onorientationchange" in win ? "orientationchange" : "resize";

            function rem() {
                docEl.style.fontSize = 100 * (container.clientWidth / 750) + "px";
            }

            //监听'DOMContent事件:DOM加载完成执行,如果DOMContent事件，那么执行rem函数
            doc.addEventListener("DOMContentLoaded", rem, false);

            //win下监听resize事件,如果resize事件，那么执行rem函数
            win.addEventListener(resize, rem, false);
        })(window, document);
    </script>
    <!-- js -->
    <script type="text/javascript" src="./js/jquery-3.4.1.js"></script>
    <script type="text/javascript" src="js/echarts.js"></script>
    <script type="text/javascript" src="./layer/layer.js"></script>


    <script>
        $(document).ready(function () {

            var index = layer.load(0, {
                shade: [0.8, '#fff']
            }); //0.1透明度的白色背景

            var projectid = GetQueryString('projectid');
            var linechartid = GetQueryString('linechartid');
            var projectNameCN = GetQueryString('projectNameCN');
            $("#projectNameCN").html(' ');
            $("#projectNameCN").html(projectNameCN);

            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/TokenAuth/GetProjectData?projectid=" + projectid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (res) {
                    var data = res.result;
                    if (data.length == 0) {
                        layer.open({
                            type: 1,
                            content: '<div>' + '通讯异常' + '</div>',
                            btn: '确定',
                            btnAlign: 'c', //按钮居中
                            shade: 0, //不显示遮罩
                            yes: function () {
                                layer.closeAll();
                                layer.close(index);
                            }
                        });
                    } else {
                        // BMS SOC 百分比
                        var val_soc_sz = Number((data[2].soc + data[3].soc) / 2).toFixed(0); // BMS SOC 百分比
                        $("#soc").html(val_soc_sz); // BMS SOC 百分比

                        var val_soh = (data[2].soh + data[3].soh) / 20;
                        $("#soh").html(val_soh); // //BMS SOH

                        var val_dwgl_sz = Number(data[6].powerGeneration + data[7].powerGeneration + data[8].powerGeneration + data[9].powerGeneration); // 发电功率
                        $("#dwgl").html(dealnumber(val_dwgl_sz)); // 发电功率

                        $("#pcsgl").html(dealnumber(data[11].pcstap)); // PCS总有功功率

                        var val_fzgl_sz = val_dwgl_sz - data[11].pcstap; // 负载功率
                        $("#fzgl").html(dealnumber(val_fzgl_sz)); // 负载功率
                        $("#fnlz").html(dealnumber(data[11].countercurrentControl)); // 防逆流值

                        // 柴油机1
                        var cyjstatus1 = '';
                        var stopMode1 = data[6].stopMode;
                        var transferToMains1 = data[6].transferToMains;
                        if ((stopMode1 == 0) && (transferToMains1 == 0)) {
                            cyjstatus1 = '分闸运行';
                        } else if ((stopMode1 == 0) && (transferToMains1 == 1)) {
                            cyjstatus1 = '合闸运行';
                        } else if (stopMode1 == 1) {
                            cyjstatus1 = '停机';
                        }
                        var val_fuel_cnc1 = Number(data[6].fuelLevel).toFixed(0);
                        $("#zt_cnc1").html(cyjstatus1); // 状态

                        $("#gl_cnc1").html(dealnumber(data[6].powerGeneration)); // 发电功率
                        $("#ryw_cnc1").html(val_fuel_cnc1); // 燃油位 百分比

                        // 柴油机2
                        var cyjstatus2 = '';
                        var stopMode2 = data[7].stopMode;
                        var transferToMains2 = data[7].transferToMains;
                        if ((stopMode2 == 0) && (transferToMains2 == 0)) {
                            cyjstatus2 = '分闸运行';
                        } else if ((stopMode2 == 0) && (transferToMains2 == 1)) {
                            cyjstatus2 = '合闸运行';
                        } else if (stopMode2 == 1) {
                            cyjstatus2 = '停机';
                        }
                        var val_fuel_cnc2 = Number(data[7].fuelLevel).toFixed(0);
                        $("#zt_cnc2").html(cyjstatus2); // 状态
                        $("#gl_cnc2").html(dealnumber(data[7].powerGeneration)); // 功率
                        $("#ryw_cnc2").html(val_fuel_cnc2); // 燃油位 百分比

                        // 柴油机3
                        var cyjstatus3 = '';
                        var stopMode3 = data[8].stopMode;
                        var transferToMains3 = data[8].transferToMains;
                        if ((stopMode3 == 0) && (transferToMains3 == 0)) {
                            cyjstatus3 = '分闸运行';
                        } else if ((stopMode3 == 0) && (transferToMains3 == 1)) {
                            cyjstatus3 = '合闸运行';
                        } else if (stopMode3 == 1) {
                            cyjstatus3 = '停机';
                        }
                        var val_fuel_cnc3 = Number(data[8].fuelLevel).toFixed(0);
                        $("#zt_cnc3").html(cyjstatus3); // 状态
                        $("#gl_cnc3").html(dealnumber(data[8].powerGeneration)); // 功率
                        $("#ryw_cnc3").html(val_fuel_cnc3); // 燃油位 百分比

                        // 柴油机4
                        var cyjstatus4 = '';
                        var stopMode4 = data[9].stopMode;
                        var transferToMains4 = data[9].transferToMains;
                        if ((stopMode4 == 0) && (transferToMains4 == 0)) {
                            cyjstatus4 = '分闸运行';
                        } else if ((stopMode4 == 0) && (transferToMains4 == 1)) {
                            cyjstatus4 = '合闸运行';
                        } else if (stopMode4 == 1) {
                            cyjstatus4 = '停机';
                        }
                        var val_fuel_cnc4 = Number(data[9].fuelLevel).toFixed(0);
                        $("#zt_cnc4").html(cyjstatus4); // 状态
                        $("#gl_cnc4").html(dealnumber(data[9].powerGeneration)); // 功率
                        $("#ryw_cnc4").html(val_fuel_cnc4); // 燃油位 百分比

                        // PCS1
                        $("#pcszyggl_sz1").html(dealnumber(data[0].tap)); //PCS总有功功率
                        $("#pcszszgl_sz1").html(dealnumber(data[0]
                            .tApparentP)); //PCS总视在功率
                        $("#pcszwggl_sz1").html(dealnumber(data[0].trp)); //PCS总无功功率

                        // PCS2
                        $("#pcszyggl_sz2").html(dealnumber(data[1].tap)); //PCS总有功功率
                        $("#pcszszgl_sz2").html(dealnumber(data[1]
                            .tApparentP)); //PCS总视在功率
                        $("#pcszwggl_sz2").html(dealnumber(data[1].trp)); //PCS总无功功率

                        // BMS1
                        $("#bmssoc1").html(dealnumber(data[2].soc)); //BMS SOC
                        $("#bmskcdl1").html(dealnumber(data[2].group_RC)); //BMS可充电量
                        $("#bmskfdl1").html(dealnumber(data[2].group_DQ)); //BMS可放电量

                        // BMS2
                        $("#bmssoc2").html(dealnumber(data[3].soc)); //BMS SOC
                        $("#bmskcdl2").html(dealnumber(data[3].group_RC)); //BMS可充电量
                        $("#bmskfdl2").html(dealnumber(data[3].group_DQ)); //BMS可放电量

                        // 设备温度1
                        $("#fkwd1").html(dealnumber(data[0].radiatorT)); //散热器温度
                        $("#jgwd1").html(dealnumber(data[0].cabinetT)); //机柜温度
                        $("#hjwd1").html(dealnumber(data[0].environmentalT)); //环境温度
                        $("#dczgwd1").html(dealnumber(data[2].mbt)); //电池最高温度
                        $("#dczdwd1").html(dealnumber(data[2].lbt)); //电池最低温度

                        // 设备温度2
                        $("#fkwd2").html(dealnumber(data[1].radiatorT)); //散热器温度
                        $("#jgwd2").html(dealnumber(data[1].cabinetT)); //机柜温度
                        $("#hjwd2").html(dealnumber(data[1].environmentalT)); //环境温度
                        $("#dczgwd2").html(dealnumber(data[3].mbt)); //电池最高温度
                        $("#dczdwd2").html(dealnumber(data[3].lbt)); //电池最低温度

                        // 设备状态1
                        if (data[0].acDispatch) {
                            // 交流调度
                            $(".jldt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".jldt1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].dcDispatch) {
                            // 直流调度
                            $(".zldd1 span").attr('class', 'onoff zton');
                        } else {
                            $(".zldd1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].runState) {
                            // PCS通讯状态/运行状态
                            $(".pcstxzt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".pcstxzt1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[2].comState) {
                            // BMS通讯状态
                            $(".bmstxzt1 span").attr('class', 'onoff zton');
                        } else {
                            $(".bmstxzt1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[0].gridState) {
                            // 并网、离网
                            $(".bw1 span").attr('class', 'onoff ztoff');
                            $(".lw1 span").attr('class', 'onoff zton');
                        } else {
                            $(".bw1 span").attr('class', 'onoff zton');
                            $(".lw1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].warnState) {
                            // 系统告警/告警状态
                            $(".xtjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtjg1 span").attr('class', 'onoff ztoff');
                        }
                        if (data[0].failureStatus) {
                            // 系统故障/故障状态
                            $(".xtgz1 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtgz1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[0].remoteControl) {
                            // 远程控制
                            $(".yckz1 span").attr('class', 'onoff zton');
                        } else {
                            $(".yckz1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].primaryAlarm) {
                            // BMS一级告警
                            $(".yjjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".yjjg1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].secondaryAlarm) {
                            // BMS二级告警
                            $(".ejjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".ejjg1 span").attr('class', 'onoff ztoff');
                        }

                        if (data[2].tertiaryAlarm) {
                            // BMS三级告警
                            $(".sjjg1 span").attr('class', 'onoff zton');
                        } else {
                            $(".sjjg1 span").attr('class', 'onoff ztoff');
                        }

                        // 设备状态2
                        if (data[1].acDispatch) {
                            // 交流调度
                            $(".jldt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".jldt2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].dcDispatch) {
                            // 直流调度
                            $(".zldd2 span").attr('class', 'onoff zton');
                        } else {
                            $(".zldd2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].runState) {
                            // PCS通讯状态/运行状态
                            $(".pcstxzt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".pcstxzt2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[3].comState) {
                            // BMS通讯状态
                            $(".bmstxzt2 span").attr('class', 'onoff zton');
                        } else {
                            $(".bmstxzt2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[1].gridState) {
                            // 并网、离网
                            $(".bw2 span").attr('class', 'onoff ztoff');
                            $(".lw2 span").attr('class', 'onoff zton');
                        } else {
                            $(".bw2 span").attr('class', 'onoff zton');
                            $(".lw2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].warnState) {
                            // 系统告警/告警状态
                            $(".xtjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtjg2 span").attr('class', 'onoff ztoff');
                        }
                        if (data[1].failureStatus) {
                            // 系统故障/故障状态
                            $(".xtgz2 span").attr('class', 'onoff zton');
                        } else {
                            $(".xtgz2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[1].remoteControl) {
                            // 远程控制
                            $(".yckz2 span").attr('class', 'onoff zton');
                        } else {
                            $(".yckz2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].primaryAlarm) {
                            // BMS一级告警
                            $(".yjjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".yjjg2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].secondaryAlarm) {
                            // BMS二级告警
                            $(".ejjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".ejjg2 span").attr('class', 'onoff ztoff');
                        }

                        if (data[3].tertiaryAlarm) {
                            // BMS三级告警
                            $(".sjjg2 span").attr('class', 'onoff zton');
                        } else {
                            $(".sjjg2 span").attr('class', 'onoff ztoff');
                        }
                        layer.close(index);
                    }

                },
                error: function (err) {
                    console.log("首次请求数据 请求失败");
                }
            });

            // tab选项卡切换
            $(".tabHead span").on("click", function () {
                var $this = $(this);
                var itemIndex = $this.index();
                $(this).addClass("active").siblings(".tabHead span").removeClass("active");
                $(".khfxPane").eq(itemIndex).show().siblings(".khfxPane").hide();
            });

            var num_index = 0;
            var pcs1_rp_1 = '';
            var pcs1_rp_2 = '';
            var pcs2_rp_1 = '';
            var pcs2_rp_2 = '';
            var xData = []; // x轴时间数据
            var yData1 = []; //实时发电功率的y轴数据
            var yData2 = []; //实时PCS功率的y轴数据
            var yData3 = []; //实时负载功率的y轴数据

            $.ajax({
                type: "GET",
                dataType: "json",
                url: "http://112.74.169.99:21021/api/services/app/ControlDataService/GetListControlDataByID?id=" + linechartid,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
                    xhr.setRequestHeader("Authorization", accessToken);
                    xhr.setRequestHeader('.AspNetCore.Culture', 'zh-Hans');
                },
                success: function (data) {
                    console.log("折线图 请求成功");
                    var data = data.result;
                    var szdata = [];
                    for (var i in data) {
                        if (data[i].devID === 11) {
                            szdata.push(data[i]);
                        }
                    }
                    for (let i = 0; i < szdata.length; i++) {
                        let datetime = new Date(szdata[i].creationTime);
                        let getHours = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
                        let getMinutes = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
                        let getSeconds = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
                        let time = getHours + ":" + getMinutes + ":" + getSeconds;
                        xData.push(time);
                        yData1.push(szdata[i].farTAP);
                        yData2.push(szdata[i].pcstap);
                        yData3.push(szdata[i].loadTAP);
                    }
                    updateData(); // 首次加载立即请求数据

                    setInterval(updateData, 1000); // 首次加载之后，每1s重新请求一次数据

                },
                error: function (err) {
                    console.log("折线图 请求失败");
                }
            });


            function updateData() { // 请求数据
                num_index++;
                var onoff = isPositiveNum(num_index / 15); //一分钟增加一次数据

                $.ajax({
                    type: "GET",
                    url: "http://112.74.169.99:21021/api/TokenAuth/GetProjectData?projectid=" + projectid,
                    success: function (res) {
                        var data = res.result;
                        // 设备功率
                        if (data[11]) {
                            // BMS SOC 百分比
                            var val_soc_sz = Number((data[2].soc + data[3].soc) / 2).toFixed(0); // BMS SOC 百分比
                            $("#soc").html(val_soc_sz); // BMS SOC 百分比

                            var val_soh = (data[2].soh + data[3].soh) / 20;
                            $("#soh").html(val_soh); // //BMS SOH

                            var val_dwgl_sz = Number(data[6].powerGeneration + data[7].powerGeneration + data[8].powerGeneration + data[9].powerGeneration); // 发电功率
                            $("#dwgl").html(dealnumber(val_dwgl_sz)); // 发电功率

                            $("#pcsgl").html(dealnumber(data[11].pcstap)); // PCS总有功功率

                            var val_fzgl_sz = val_dwgl_sz - data[11].pcstap; // 负载功率
                            $("#fzgl").html(dealnumber(val_fzgl_sz)); // 负载功率

                            $("#fnlz").html(dealnumber(data[11].countercurrentControl)); // 防逆流值

                            // 柴油机1
                            var cyjstatus1 = '';
                            var stopMode1 = data[6].stopMode;
                            var transferToMains1 = data[6].transferToMains;
                            if ((stopMode1 == 0) && (transferToMains1 == 0)) {
                                cyjstatus1 = '分闸运行';
                            } else if ((stopMode1 == 0) && (transferToMains1 == 1)) {
                                cyjstatus1 = '合闸运行';
                            } else if (stopMode1 == 1) {
                                cyjstatus1 = '停机';
                            }
                            var val_fuel_cnc1 = Number(data[6].fuelLevel).toFixed(0);
                            $("#zt_cnc1").html(cyjstatus1); // 状态

                            $("#gl_cnc1").html(dealnumber(data[6].powerGeneration)); // 发电功率
                            $("#ryw_cnc1").html(val_fuel_cnc1); // 燃油位 百分比

                            // 柴油机2
                            var cyjstatus2 = '';
                            var stopMode2 = data[7].stopMode;
                            var transferToMains2 = data[7].transferToMains;
                            if ((stopMode2 == 0) && (transferToMains2 == 0)) {
                                cyjstatus2 = '分闸运行';
                            } else if ((stopMode2 == 0) && (transferToMains2 == 1)) {
                                cyjstatus2 = '合闸运行';
                            } else if (stopMode2 == 1) {
                                cyjstatus2 = '停机';
                            }
                            var val_fuel_cnc2 = Number(data[7].fuelLevel).toFixed(0);
                            $("#zt_cnc2").html(cyjstatus2); // 状态
                            $("#gl_cnc2").html(dealnumber(data[7].powerGeneration)); // 功率
                            $("#ryw_cnc2").html(val_fuel_cnc2); // 燃油位 百分比

                            // 柴油机3
                            var cyjstatus3 = '';
                            var stopMode3 = data[8].stopMode;
                            var transferToMains3 = data[8].transferToMains;
                            if ((stopMode3 == 0) && (transferToMains3 == 0)) {
                                cyjstatus3 = '分闸运行';
                            } else if ((stopMode3 == 0) && (transferToMains3 == 1)) {
                                cyjstatus3 = '合闸运行';
                            } else if (stopMode3 == 1) {
                                cyjstatus3 = '停机';
                            }
                            var val_fuel_cnc3 = Number(data[8].fuelLevel).toFixed(0);
                            $("#zt_cnc3").html(cyjstatus3); // 状态
                            $("#gl_cnc3").html(dealnumber(data[8].powerGeneration)); // 功率
                            $("#ryw_cnc3").html(val_fuel_cnc3); // 燃油位 百分比

                            // 柴油机4
                            var cyjstatus4 = '';
                            var stopMode4 = data[9].stopMode;
                            var transferToMains4 = data[9].transferToMains;
                            if ((stopMode4 == 0) && (transferToMains4 == 0)) {
                                cyjstatus4 = '分闸运行';
                            } else if ((stopMode4 == 0) && (transferToMains4 == 1)) {
                                cyjstatus4 = '合闸运行';
                            } else if (stopMode4 == 1) {
                                cyjstatus4 = '停机';
                            }
                            var val_fuel_cnc4 = Number(data[9].fuelLevel).toFixed(0);
                            $("#zt_cnc4").html(cyjstatus4); // 状态
                            $("#gl_cnc4").html(dealnumber(data[9].powerGeneration)); // 功率
                            $("#ryw_cnc4").html(val_fuel_cnc4); // 燃油位 百分比

                            // PCS1
                            $("#pcszyggl_sz1").html(dealnumber(data[0].tap)); //PCS总有功功率
                            $("#pcszszgl_sz1").html(dealnumber(data[0]
                                .tApparentP)); //PCS总视在功率
                            $("#pcszwggl_sz1").html(dealnumber(data[0].trp)); //PCS总无功功率

                            // PCS2
                            $("#pcszyggl_sz2").html(dealnumber(data[1].tap)); //PCS总有功功率
                            $("#pcszszgl_sz2").html(dealnumber(data[1]
                                .tApparentP)); //PCS总视在功率
                            $("#pcszwggl_sz2").html(dealnumber(data[1].trp)); //PCS总无功功率

                            // BMS1
                            $("#bmssoc1").html(dealnumber(data[2].soc)); //BMS SOC
                            $("#bmskcdl1").html(dealnumber(data[2].group_RC)); //BMS可充电量
                            $("#bmskfdl1").html(dealnumber(data[2].group_DQ)); //BMS可放电量

                            // BMS2
                            $("#bmssoc2").html(dealnumber(data[3].soc)); //BMS SOC
                            $("#bmskcdl2").html(dealnumber(data[3].group_RC)); //BMS可充电量
                            $("#bmskfdl2").html(dealnumber(data[3].group_DQ)); //BMS可放电量

                            // 设备温度1
                            $("#fkwd1").html(dealnumber(data[0].radiatorT)); //散热器温度
                            $("#jgwd1").html(dealnumber(data[0].cabinetT)); //机柜温度
                            $("#hjwd1").html(dealnumber(data[0].environmentalT)); //环境温度
                            $("#dczgwd1").html(dealnumber(data[2].mbt)); //电池最高温度
                            $("#dczdwd1").html(dealnumber(data[2].lbt)); //电池最低温度

                            // 设备温度2
                            $("#fkwd2").html(dealnumber(data[1].radiatorT)); //散热器温度
                            $("#jgwd2").html(dealnumber(data[1].cabinetT)); //机柜温度
                            $("#hjwd2").html(dealnumber(data[1].environmentalT)); //环境温度
                            $("#dczgwd2").html(dealnumber(data[3].mbt)); //电池最高温度
                            $("#dczdwd2").html(dealnumber(data[3].lbt)); //电池最低温度

                            // 设备状态1
                            if (data[0].acDispatch) {
                                // 交流调度
                                $(".jldt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".jldt1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].dcDispatch) {
                                // 直流调度
                                $(".zldd1 span").attr('class', 'onoff zton');
                            } else {
                                $(".zldd1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].runState) {
                                // PCS通讯状态/运行状态
                                $(".pcstxzt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".pcstxzt1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[2].comState) {
                                // BMS通讯状态
                                $(".bmstxzt1 span").attr('class', 'onoff zton');
                            } else {
                                $(".bmstxzt1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[0].gridState) {
                                // 并网、离网
                                $(".bw1 span").attr('class', 'onoff ztoff');
                                $(".lw1 span").attr('class', 'onoff zton');
                            } else {
                                $(".bw1 span").attr('class', 'onoff zton');
                                $(".lw1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].warnState) {
                                // 系统告警/告警状态
                                $(".xtjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtjg1 span").attr('class', 'onoff ztoff');
                            }
                            if (data[0].failureStatus) {
                                // 系统故障/故障状态
                                $(".xtgz1 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtgz1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[0].remoteControl) {
                                // 远程控制
                                $(".yckz1 span").attr('class', 'onoff zton');
                            } else {
                                $(".yckz1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].primaryAlarm) {
                                // BMS一级告警
                                $(".yjjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".yjjg1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].secondaryAlarm) {
                                // BMS二级告警
                                $(".ejjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".ejjg1 span").attr('class', 'onoff ztoff');
                            }

                            if (data[2].tertiaryAlarm) {
                                // BMS三级告警
                                $(".sjjg1 span").attr('class', 'onoff zton');
                            } else {
                                $(".sjjg1 span").attr('class', 'onoff ztoff');
                            }

                            // 设备状态2
                            if (data[1].acDispatch) {
                                // 交流调度
                                $(".jldt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".jldt2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].dcDispatch) {
                                // 直流调度
                                $(".zldd2 span").attr('class', 'onoff zton');
                            } else {
                                $(".zldd2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].runState) {
                                // PCS通讯状态/运行状态
                                $(".pcstxzt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".pcstxzt2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[3].comState) {
                                // BMS通讯状态
                                $(".bmstxzt2 span").attr('class', 'onoff zton');
                            } else {
                                $(".bmstxzt2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[1].gridState) {
                                // 并网、离网
                                $(".bw2 span").attr('class', 'onoff ztoff');
                                $(".lw2 span").attr('class', 'onoff zton');
                            } else {
                                $(".bw2 span").attr('class', 'onoff zton');
                                $(".lw2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].warnState) {
                                // 系统告警/告警状态
                                $(".xtjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtjg2 span").attr('class', 'onoff ztoff');
                            }
                            if (data[1].failureStatus) {
                                // 系统故障/故障状态
                                $(".xtgz2 span").attr('class', 'onoff zton');
                            } else {
                                $(".xtgz2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[1].remoteControl) {
                                // 远程控制
                                $(".yckz2 span").attr('class', 'onoff zton');
                            } else {
                                $(".yckz2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].primaryAlarm) {
                                // BMS一级告警
                                $(".yjjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".yjjg2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].secondaryAlarm) {
                                // BMS二级告警
                                $(".ejjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".ejjg2 span").attr('class', 'onoff ztoff');
                            }

                            if (data[3].tertiaryAlarm) {
                                // BMS三级告警
                                $(".sjjg2 span").attr('class', 'onoff zton');
                            } else {
                                $(".sjjg2 span").attr('class', 'onoff ztoff');
                            }


                            if (onoff) {
                                let datetimenew = new Date(data[11].creationTime);
                                let getHoursnew = datetimenew.getHours() < 10 ? "0" + datetimenew.getHours() : datetimenew.getHours();
                                let getMinutesnew = datetimenew.getMinutes() < 10 ? "0" + datetimenew.getMinutes() : datetimenew.getMinutes();
                                let getSecondsnew = datetimenew.getSeconds() < 10 ? "0" + datetimenew.getSeconds() : datetimenew.getSeconds();
                                let timenew = getHoursnew + ":" + getMinutesnew + ":" + getSecondsnew;
                                xData.push(timenew);
                                yData1.push(data[11].farTAP);
                                yData2.push(data[11].pcstap);
                                yData3.push(data[11].loadTAP);
                            }
                            // 实时发电功率
                            var echarts1 = echarts.init(document.getElementById("echarts1"));
                            var echarts1_option = {
                                title: {
                                    top: "0",
                                    left: "left",
                                    text: "实时发电功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "rgb(0, 28, 67)",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#526073",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 50,
                                    // max: 350,
                                    // min: 250,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#526073",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData1
                                }]
                            };
                            echarts1.setOption(echarts1_option);

                            // 实时PCS功率
                            var echarts2 = echarts.init(document.getElementById("echarts2"));
                            var echarts2_option = {
                                title: {
                                    top: "0",
                                    left: "left",
                                    text: "实时PCS功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "rgb(0, 28, 67)",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#526073",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 50,
                                    // max: 150,
                                    // min: -250,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#526073",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData2
                                }]
                            };
                            echarts2.setOption(echarts2_option);

                            // 实时负载功率
                            var echarts3 = echarts.init(document.getElementById("echarts3"));
                            var echarts3_option = {
                                title: {
                                    top: "0",
                                    left: "left",
                                    text: "实时负载功率(kW)",
                                    textStyle: {
                                        align: "left",
                                        color: "#7F94B2",
                                        fontWeight: "800",
                                        fontSize: 15
                                    }
                                },
                                backgroundColor: "rgb(0, 28, 67)",
                                grid: {
                                    right: "0",
                                    bottom: "0",
                                    left: "15px",
                                    top: "40px",
                                    containLabel: true
                                },
                                xAxis: [{
                                    type: "category",
                                    data: xData,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: true,
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        },
                                        length: 3
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        // interval:1,
                                        textStyle: {
                                            color: "#526073",
                                            fontSize: 9
                                        },
                                        rotate: 30
                                    }
                                }],
                                yAxis: [{
                                    type: "value",
                                    position: "left",
                                    // interval: 100,
                                    // max: 600,
                                    // min: 100,
                                    axisLine: {
                                        //坐标轴轴线相关设置
                                        lineStyle: {
                                            color: "#162B48",
                                            width: "1"
                                        }
                                    },
                                    splitLine: {
                                        show: false
                                    },
                                    axisTick: {
                                        //坐标轴刻度相关设置
                                        show: false
                                    },
                                    axisLabel: {
                                        //坐标轴刻度标签的相关设置
                                        show: true,
                                        color: "#526073",
                                        fontSize: 9
                                    },
                                    // scale: true
                                }],
                                series: [{
                                    type: "line",
                                    yAxisIndex: 0,
                                    symbolSize: 4,
                                    itemStyle: {
                                        normal: {
                                            color: "#0167FF"
                                        }
                                    },
                                    data: yData3
                                }]
                            };
                            echarts3.setOption(echarts3_option);

                        }



                        // 一次系统图
                        // 一级柜数据
                        var cyj_rp = data[11].farTAP;
                        $("#cyj_rp").html(cyj_rp);
                        var cyj_sxdy = data[11].aFarACV;
                        cyj_sxdy = cyj_sxdy + "/" + data[11].bFarACV;
                        cyj_sxdy = cyj_sxdy + "/" + data[11].cFarACV;
                        $("#cyj_sxdy").html(cyj_sxdy);
                        var cyj_sxdl = data[11].aFarACA;
                        cyj_sxdl = cyj_sxdl + "/" + data[11].bFarACA;
                        cyj_sxdl = cyj_sxdl + "/" + data[11].cFarACA;
                        $("#cyj_sxdl").html(cyj_sxdl);

                        // 负载数据
                        var load = data[11].loadTAP;
                        $("#load").html(load);

                        // pcs1
                        var pcs1_sxdy = data[0].abacv;
                        pcs1_sxdy = pcs1_sxdy + "/" + data[0].bcacv;
                        pcs1_sxdy = pcs1_sxdy + "/" + data[0].caacv;
                        $("#pcs1_sxdy").html(pcs1_sxdy);
                        var pcs1_sxdl = data[0].aaci;
                        pcs1_sxdl = pcs1_sxdl + "/" + data[0].baci;
                        pcs1_sxdl = pcs1_sxdl + "/" + data[0].caci;
                        $("#pcs1_sxdl").html(pcs1_sxdl);
                        var pcs1_rp = data[0].tap;
                        $("#pcs1_rp").html(pcs1_rp);
                        if (num_index === 1) {
                            pcs1_rp_1 = data[0].tap;
                            if (pcs1_rp_1 < 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin gotop" style="left:20%; top:13.5%;  height:28%;z-index: 1;"> </div>` +
                                                `<div id="gdownline12" class="vpdif vpthin gotop" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs1_rp_1 > 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin godown" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline12" class="vpdif vpthin godown" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs1_rp_1 === 0) {
                                $("#pcs1").html(`<div id="gdownline11" class="vp vpthin" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline12" class="vpdif vpthin" style="left:20%; top:45%;  height:35%;z-index: 1;"></div>`);
                            }
                        } else {
                            pcs1_rp_2 = data[0].tap;
                            var pcs1_rp_1_sign = Math.sign(pcs1_rp_1);
                            var pcs1_rp_2_sign = Math.sign(pcs1_rp_2);
                            if (pcs1_rp_1_sign != pcs1_rp_2_sign) {
                                if (pcs1_rp < 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin gotop" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin gotop" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                } else if (pcs1_rp > 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin godown" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin godown" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                } else if (pcs1_rp === 0) {
                                    $("#pcs1").html(
                                        `<div id="gdownline11" class="vp vpthin" style="left:20%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                        `<div id="gdownline12" class="vpdif vpthin" style="left:25%; top:45%;  height:35%;z-index: 1;"></div>`
                                    );
                                }
                            }

                        }

                        if (data[0].gridState == 0) {
                            var pcs1_blw = "并网";
                        } else {
                            var pcs1_blw = "离网";
                        }
                        $("#pcs1_blw").html(pcs1_blw);

                        // pcs2
                        var pcs2_sxdy = data[1].abacv;
                        pcs2_sxdy = pcs2_sxdy + "/" + data[1].bcacv;
                        pcs2_sxdy = pcs2_sxdy + "/" + data[1].caacv;
                        $("#pcs2_sxdy").html(pcs2_sxdy);
                        var pcs2_sxdl = data[1].aaci;
                        pcs2_sxdl = pcs2_sxdl + "/" + data[1].baci;
                        pcs2_sxdl = pcs2_sxdl + "/" + data[1].caci;
                        $("#pcs2_sxdl").html(pcs2_sxdl);

                        var pcs2_rp = data[1].tap;
                        $("#pcs2_rp").html(pcs2_rp);
                        if (num_index === 1) {
                            pcs2_rp_1 = data[1].tap;
                            if (pcs2_rp_1 < 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin gotop" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin gotop" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs2_rp_1 > 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin godown" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin godown" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            } else if (pcs2_rp_1 === 0) {
                                $("#pcs2").html(`<div id="gdownline21" class="vp vpthin" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                `<div id="gdownline22" class="vpdif vpthin" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                            }

                        } else {
                            pcs2_rp_2 = data[1].tap;
                            var pcs2_rp_1_sign = Math.sign(pcs2_rp_1);
                            var pcs2_rp_2_sign = Math.sign(pcs2_rp_2);

                            if (pcs2_rp_1_sign != pcs2_rp_2_sign) {
                                if (pcs2_rp_2 < 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin gotop" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin gotop" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                } else if (pcs2_rp_2 > 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin godown" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin godown" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                } else if (pcs2_rp_2 === 0) {
                                    $("#pcs2").html(`<div id="gdownline21" class="vp vpthin" style="left:58%; top:13.5%;  height:28%;z-index: 1;"></div>` +
                                                    `<div id="gdownline22" class="vpdif vpthin" style="left:58%; top:45%;  height:35%;z-index: 1;"></div>`);
                                }
                            }
                        }

                        if (data[1].gridState == 0) {
                            var pcs2_blw = "并网";
                        } else {
                            var pcs2_blw = "离网";
                        }
                        $("#pcs2_blw").html(pcs2_blw);


                        // bms1
                        var bms1_dl = data[2].group_I;
                        $("#bms1_dl").html(bms1_dl);
                        var bms1_dy = data[2].group_V;
                        $("#bms1_dy").html(bms1_dy);
                        var bms1_soc = data[2].soc;
                        $("#bms1_soc").html(bms1_soc);

                        // bms2
                        var bms2_dl = data[3].group_I;
                        $("#bms2_dl").html(bms2_dl);
                        var bms2_dy = data[3].group_V;
                        $("#bms2_dy").html(bms2_dy);
                        var bms2_soc = data[3].soc;
                        $("#bms2_soc").html(bms2_soc);

                        // ac1
                        var ac1_sd = data[4].humidity;
                        $("#ac1_sd").html(ac1_sd);
                        var ac1_wd = data[4].innerTemperature;
                        $("#ac1_wd").html(ac1_wd);

                        // ac2
                        var ac2_sd = data[5].humidity;
                        $("#ac2_sd").html(ac2_sd);
                        var ac2_wd = data[5].innerTemperature;
                        $("#ac2_wd").html(ac2_wd);

                    },
                    error: function (err) {
                        console.log("项目状态参数 请求失败");
                    }
                });
            }

        });
    </script>
</body>

</html>